<table id="ugList">
<tr id="tr_0">
	<th colspan="2">用户组列表</th>
	<td><a href="?controller=admin_user&action=userlist">全部用户</a></td>
	<td><a class="ugAdd" href="0">添加根类</a></td>
	<td></td>
</tr>
{{ section name=i loop=$ugList }}
<tr id="tr_{{ $ugList[i].user_group_id }}">
	<th>{{ $ugList[i].levelstr }} {{ $ugList[i].group_name }}</th>
	<td><a href="#" onclick="ugModify({{$ugList[i].user_group_id}},'{{$ugList[i].group_name}}','{{$ugList[i].description}}');">修改</a></td>
	<td><a href="?controller=admin_user&action=userlist&ug_id={{$ugList[i].user_group_id}}" title="查看本组成员">用户(<span class="red">{{ $ugList[i].has_members }}</span>)</a></td>
	<td><a class="ugAdd" href="{{$ugList[i].user_group_id}}">添加子类</a></td>
	<td><a class="band" href="#" user_group_id="{{$ugList[i].user_group_id}}" title="绑定角色或权限">绑定</a></td>
	<td><a class="removeUserGroup" id="{{$ugList[i].user_group_id}}" href="#">删除</a></td>
</tr>
{{ /section }}
</table>

<!-- 修改用户组的表单 -->
<div id="formModifyUserGroupBox" class='hideme'>
<form id='formModifyUserGroup' action='?controller=admin_usergroup&action=modifyusergroup' method='post'>

	<table>
		<tr>
			<th>ID:</th>
			<td>
				<input id='user_group_id' name='user_group_id' type='text' readonly='readonly' size='4' /> * 不可修改
			</td>
		</tr>
		<tr>
			<th>父类:</th>
			<td><select id="select_fclass" name="parent_id"></select> * 如不需修改请留空</td>
		</tr>
		<tr>
			<th>用户组名:</th>
			<td>
				<input id='group_name' name='group_name' type='text' size='50'
			 	class='required' title='用户组名不能为空' alt="{event: 'blur'}" />
			</td>
		</tr>
		<tr>
			<th>描述:</th>
			<td><input id='description' name='description' type='text' size='50' /></td>
		</tr>
		<tr>
			<th></th>
			<td>
				<input type='submit' value='修改' class='submitbutton' />
				<input type='button' value='取消' class='submitbutton' onclick='_removeModifyForm();' />
			</td>
		</tr>
	</table>
	
</form>

<form id='formAddUserGroup' action='?controller=admin_usergroup&action=modifyusergroup' method='post'>

	<table>
		<tr>
			<th>父类ID:</th>
			<td><input id='parent_id' name='parent_id' type='text' readonly='readonly' size='4' /></td>
		</tr>
		<tr>
			<th>用户组名:</th>
			<td>
				<input id='group_name' name='group_name' type='text' size='50'
			 	class='required' title='用户组名不能为空' alt="{event: 'blur'}" />
			</td>
		</tr>
		<tr>
			<th>描述:</th>
			<td><input id='description' name='description' type='text' size='50' /></td>
		</tr>
		<tr>
			<th></th>
			<td>
				<input type='submit' value='添加为子类' class='submitbutton' />
				<input type='button' value='取消' class='submitbutton' onclick='_removeModifyForm();' />
			</td>
		</tr>
	</table>
	
</form>
</div>


